package com.cb.domain.service.Insurance.Impl;

import java.util.Date;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import webservices.sbe.InsuranceSbeManager;

import com.cb.domain.model.order.BOrder;
import com.cb.domain.model.order.Passenger;
import com.cb.domain.service.Insurance.InsuranceSaver;
@Service
public class OutSideInsuranceImpl implements InsuranceSaver{
	private final static Logger logger=Logger.getLogger(OutSideInsuranceImpl.class);
	@Resource
	private InsuranceSbeManager insuranceSbeManager;
	@Override
	/**
	 * 航信保险接口
	 */
	public String saveInsuranceByBOrder(BOrder order,Passenger passenger) {
		String res="";
		try{
			res=insuranceSbeManager.booking(order, passenger);
		}catch(Exception e){
			logger.error(e.getMessage(), e);
		}
		return res;
	}
	@Override
	public String cancleInsuranceByBOrder(String orderId, Date date) {
		// TODO Auto-generated method stub
		int i=insuranceSbeManager.cancel(orderId);
		return null;
	}

}
